package com.csdj.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.csdj.server.pojo.Admin;
import com.csdj.server.pojo.RespBean;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ZouLi
 * @since 2022-12-12
 */
public interface IAdminService extends IService<Admin> {

    RespBean login(String username, String password, String code, HttpServletRequest request);

    Admin getUserByUserName(String username);

    List<Admin> getAllAdmin(String keyword);

    RespBean updatePassword(String oldPass, String pass, Integer adminId);

    /**
     * 更新用户头像
     * @param url
     * @param id
     * @param authentication
     * @return
     */
    RespBean updateAdminUserFace(String url, Integer id, Authentication authentication);
}
